package com.atguigu.jxc.service;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.SaleCount;
import com.atguigu.jxc.entity.SaleData;
import com.atguigu.jxc.entity.SaleList;
import com.atguigu.jxc.entity.SaleListGoods;

import java.util.List;

public interface SaleListGoodsService {
    /**
     * 保存销售单
     * @param saleList
     * @param saleListGoodsStr
     * @return
     */
    ServiceVO save(SaleList saleList, String saleListGoodsStr);

    /**
     * 查询销售单据
     * @param saleNumber
     * @param customerId
     * @param state
     * @param sTime
     * @param eTime
     * @return
     */
    List<SaleList> list(String saleNumber, Integer customerId, Integer state, String sTime, String eTime);

    /**
     * 查询销售单中的销售商品
     * @param saleListId
     * @return
     */
    List<SaleListGoods> goodsList(Integer saleListId);

    /**
     * 删除销售单
     * @param saleListId
     */
    void delete(Integer saleListId);

    /**
     * 修改支付状态
     * @param saleListId
     */
    void updateState(Integer saleListId);

    /**
     * 销售统计
     * @param sTime
     * @param eTime
     * @param goodsTypeId
     * @param codeOrName
     * @return
     */
    List<SaleCount> count(String sTime, String eTime, Integer goodsTypeId, String codeOrName);

    /**
     * 按日统计
     * @param sTime
     * @param eTime
     * @return
     */
    List<SaleData> getSaleDateByDay(String sTime, String eTime);

    /**
     * 按月统计
     * @param sTime
     * @param eTime
     * @return
     */
    List<SaleData> getSaleDateByMonth(String sTime, String eTime);
}
